package com.dingreading.cloud.mall.service;

import com.dingreading.cloud.common.base.R;
import com.dingreading.cloud.common.util.PageUtil;
import com.dingreading.cloud.mall.entity.OrderForm;
import com.mybatisflex.core.service.IService;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

/**
 * 服务层。
 *
 * @author Administrator
 * @since 2023-11-22
 */
public interface OrderFormServiceV5 extends IService<OrderForm> {

    R<Object> pageList(
            PageUtil pageUtil, String storeUid, String staffUid, String keyword, Integer status
    );

    R<Object> get(String storeUid, String staffUid, String code);

    R<Object>  getFormStatus(String staffUid, String code);

    R<Object> judgeCancel(String storeUid, String staffUid, String code);

    OrderForm getByCode(String staffUid, String code);

    R<Object> cancel(String storeUid, String staffUid, String staffName, String code, String remark);

    R<Object> editAddress(String storeUid, String staffUid, String code, Long deliveryId);

    R<Object> deleteForm(String storeUid, String staffUid, String code);

    R<Object> againAddShopCart(String storeUid, String staffUid, String staffName, String code);

    R<Object> uploadBankPayImg(String storeUid, String staffUid, String staffName, String code, MultipartFile file) throws Exception;

    R<Object> dropBankPayImg(String storeUid, String staffUid, String code, Long imgId);

    R<Object> getBankPayImg(String storeUid, String staffUid, String code);

    R<Object> bankPay(HttpServletRequest request, String storeUid, String staffUid,String staffName, String code);

    R<Object> cancelBankPay(String storeUid, String staffUid, String staffName, String code);

    void updatePayChannelCodeAndCorpPay(String staffUid, String code, String payChannelCode);

    void updatePayChannelCode(String staffUid, String code, String payChannelCode);

    boolean payOkGoodsOrder(String staffUid, String code, Integer payType, String tradeType, String buyerId, String tradeNo, Integer payOnline, String payTime);

    boolean payOkGiftGoodsOrder(String staffUid, String code, Integer payType, String tradeType, String payChannelCode, String payTime);
}
